package com.yunhe.option.service.data;

//import com.yunhe.common.domain.data.Area;
import com.yunhe.option.domain.base.Area;
import com.yunhe.option.domain.data.CostPrice;
import com.yunhe.option.domain.data.SeasonPrice;
import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.exception.ObjectNotFoundException;
import com.yunhe.common.exception.UniqueConstraintsException;
import com.yunhe.common.model.PageParam;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

@Service
public interface CostPriceService {

    CostPrice createCostPrice (CostPrice costPrice)
        throws ArgumentErrorException, UniqueConstraintsException, ObjectNotFoundException;

//    Iterable<CostPrice> createCostPrices (List<CostPrice> list)
//        throws ArgumentErrorException, UniqueConstraintsException, ObjectNotFoundException;

    void delete (Long costPriceId) throws ArgumentErrorException;

    CostPrice updateCostPrice (CostPrice costPrice)
        throws ArgumentErrorException, UniqueConstraintsException, ObjectNotFoundException;

    CostPrice updateCostPrice (Long costPriceId,
                               String title,
                               List<Long> areaList,
                               String property,
                               List<Long> voltageLevelCode,
                               List<SeasonPrice> seasonPrices)
        throws ArgumentErrorException, UniqueConstraintsException, ObjectNotFoundException;

    Iterable<CostPrice> search (String queryStr,
                                Long stationId,
                                PageParam pageParam);

    Optional<CostPrice> findById (Long id);

    Long findTotalCount (String queryStr);

    void bindVoltages (CostPrice costPrice);

    void bindArea (CostPrice costPrice, Area area);

    void bindStation (Long stationId, Long costPriceId);
}
